home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / 422mods.zip / FTAG2.422 < prev    next >
Text File  |  1993-04-16  |  7KB  |  296 lines

  1. Part 2 of 3  (FTAG.422)
  2. Commander Riker #1 @7751
  3. 3Saturday, April 10, 1993  1 6:52 am
  4. ═══[ Step 7        ]═══════════════════════════════════════════════════════
  5.  
  6. Open "XFER.C" and let the fun begin <g>...
  7.  
  8. Find int ratio_ok and add the following:
  9.  
  10. =   if (!(thisuser.exempt & exempt_ratio))
  11. =     if ((syscfg.req_ratio>0.0001) && (ratio()<syscfg.req_ratio)) {
  12. =       ok=0;
  13.       if (!in_tag) {  /* FT422 */
  14. =       nl();
  15. =       nl();
  16. =       sprintf(s,"%s %-5.3f.  %s %-5.3f %s.",
  17. =               get_string(730), ratio(),
  18. =               get_string(731), syscfg.req_ratio,
  19. =               get_string(732));
  20. =       pl(s);
  21. =       nl();
  22. =       }
  23. =     }
  24. =
  25. =   if (!(thisuser.exempt & exempt_post))
  26. =     if ((syscfg.post_call_ratio>0.0001) && (post_ratio()<syscfg.post_call_rat
  27. io)) {
  28. =       ok=0;
  29.       if (!in_tag) {  /* FT422 */
  30. =       nl();
  31. =       nl();
  32. =       sprintf(s,"%s %-5.3f.  %s %-5.3f %s.",
  33. =               get_string(733), post_ratio(),
  34. =               get_string(731), syscfg.post_call_ratio,
  35.  
  36.  
  37. Add these lines to printinfo
  38.  
  39. =  int i,next,fc;
  40.  
  41. =  fc=thisuser.sysstatus & sysstatus_funky_colors;
  42.  
  43. +  if (file_ptr>=MAX_FILES)
  44. +      file_ptr=0;
  45. +  if ((in_tag) && !(thisuser.sysstatus&sysstatus_no_tag) && (!x_only)) {
  46. +    file_index[file_ptr].directory=udir[curdir].subnum;
  47. +    strcpy(file_index[file_ptr].filename,u->filename);
  48. +    if (fc)
  49. +        sprintf(s,"7[%c%2d7] ",0
  50. +                  (check_batch_queue(u->filename))?'1':'2', file_ptr+1);
  51. +      else
  52. +       sprintf(s,"[%2d] ",file_ptr+1);
  53. +     file_ptr++;
  54. +     osan(s,abort,&next);
  55. +  }
  56.  
  57.  
  58. Go futher down into printinfo
  59.  
  60. =  if (fc)
  61. =    ansic(5);
  62. -  pla(u->description,abort);
  63. +  strcpy(s,u->description);
  64. +  if ((in_tag) && !(thisuser.sysstatus&sysstatus_no_tag) && (!x_only))
  65. +     if (strlen(s)>53)
  66. +        s[53]=0;
  67. +  pla(s,abort);
  68. =  if ((!*abort) && (thisuser.num_extended) && (u->mask & mask_extended))
  69.  
  70. Find listfiles and add the following:
  71.  
  72.  
  73. =   char s[81];
  74. =   int i,abort,next=0;
  75. +   uploadsrec u;
  76.  
  77. +   in_tag=1;
  78. +   file_ptr=0;
  79. =   dliscan();
  80. =   file_mask(s);
  81. =   abort=0;
  82. =   num_listed=0;
  83. =   printtitle(&abort);
  84. =   for (i=1; (i<=numf) && (!abort) && (!hangup); i++) {
  85. =     SETREC(i);
  86. =     read(dlf,(void *)&u,sizeof(uploadsrec));
  87. =     if (compare(s,u.filename))
  88. =       printinfo(&u,&abort);
  89. =     else if (!empty())
  90. =       checka(&abort,&next);
  91. =   }
  92. +   tag_files();  /* FT422 */
  93. =   closedl();
  94. =   if (!abort) {
  95. =     nl();
  96. =     nl();
  97. =     sprintf(s,"%s: %d",get_string(744), num_listed);
  98. =     pl(s);
  99. =     nl();
  100. =   }
  101. +   in_tag=0;  /* FT422 */
  102. = }
  103.  
  104.  
  105. Next look for nscandir...
  106.  
  107. =   if ((dir_dates[udir[d].subnum]) && (dir_dates[udir[d].subnum]<nscandate))
  108. =     return;
  109. =
  110. +   in_tag=1;  /* FT422 */
  111. +   file_ptr=0;  /* FT422 */
  112. =   od=curdir;
  113. =   curdir=d;
  114. =   dt=title;
  115. =   dliscan();
  116. =   if (this_date>=nscandate) {
  117. =     for (i=1; (i<=numf) && (!(*abort)) && (!hangup); i++) {
  118. =       SETREC(i);
  119. =       read(dlf,(void *)&u,sizeof(uploadsrec));
  120. =       if (u.daten>=nscandate) {
  121. =         if (dt) {
  122. =           printtitle(abort);
  123. =           dt=0;
  124. =         }
  125. =         printinfo(&u,abort);
  126. =       } else if (!empty())
  127. =         checka(abort,&next);
  128. =
  129. =     }
  130. =
  131. =   }
  132. +   tag_files();  /* FT422 */
  133. =   closedl();
  134. =   curdir=od;
  135. +   in_tag=0;  /* FT422 */
  136. = }
  137.  
  138.  
  139. Next find "void searchall()"
  140.  
  141. = void searchall(void)
  142. = {
  143. =   int i,i1,pts,abort,pty,ocd,next=0;
  144. =   char s[81],s1[81];
  145. =   uploadsrec u;
  146. =
  147. =   abort=0;
  148. =   ocd=curdir;
  149. =   if (x_only) {
  150. =     strcpy(s,"*.*");
  151. =     align(s);
  152. =   } else {
  153. +     in_tag=1;  /* FT422 */
  154. +     file_ptr=0;  /* FT422 */
  155. =     nl();
  156. =     nl();
  157. =     pl(get_string(745));
  158. =     file_mask(s);
  159. =   }
  160. =   num_listed=0;
  161. =   for (i=0; (i<num_dirs) && (!abort) && (!hangup) && (udir[i].subnum!=-1); i+
  162. +) {
  163. =     i1=udir[i].subnum;
  164. =     pts=0;
  165. =     if (qsc_n[i1/32]&(1L<<(i1%32)))
  166. =       pts=1;
  167. =     pts=1;
  168. =     /* remove pts=1 to search only marked directories */
  169. =     if (pts) {
  170. =       curdir=i;
  171. =       dliscan();
  172. =       pty=1;
  173. =       for (i1=1; (i1<=numf) && (!abort) && (!hangup); i1++) {
  174. =         SETREC(i1);
  175. =         read(dlf,(void *)&u,sizeof(uploadsrec));
  176. =         if (compare(s,u.filename)) {
  177. =           if (pty) {
  178. =             printtitle(&abort);
  179. =             pty=0;
  180. =           }
  181. =           printinfo(&u,&abort);
  182. =         } else if (!empty())
  183. =           checka(&abort,&next);
  184. =       }
  185. +       tag_files();  /* FT422 */
  186. =       closedl();
  187. =     }
  188. =   }
  189. =   curdir=ocd;
  190. =   if ((num_listed) && (!abort)) {
  191. =     nl();
  192. =     nl();
  193. =     sprintf(s,"%s: %d",get_string(744), num_listed);
  194. =     pl(s);
  195. =     nl();
  196. =   }
  197. +   in_tag=0;  /* FT422 */
  198. = }
  199.  
  200.  
  201. Next find "void finddescription"
  202.  
  203. =  nl();
  204. =  nl();
  205. +  in_tag=1;
  206. +  file_ptr=0;
  207. =  pl("Find description -");
  208.  
  209. and near the end of that one add
  210.  
  211. =  }
  212. +  in_tag=0;
  213. =}
  214. = void finddescription(void)
  215. = {
  216. =   uploadsrec u;
  217. =   int i,i1,i2,abort,pty,d,ocd,pts,next=0;
  218. =   char s[81],s1[81];
  219. =
  220. =   nl();
  221. =   nl();
  222. +   in_tag=1;  /* FT422 */
  223. +   file_ptr=0;  /* FT422 */
  224. =   pl(get_string(793));
  225. =   nl();
  226. =   pl(get_string(794));
  227. =   outstr(":");
  228. =   input(s1,58);
  229. =   if (s1[0]==0)
  230. =     return;
  231.  
  232. and a little further down...
  233.  
  234. =         strcpy(s,u.description);
  235. =         for (i2=0; i2<strlen(s); i2++)
  236. =           s[i2]=upcase(s[i2]);
  237. =         if (strstr(s,s1)!=NULL) {
  238. =           if (pty) {
  239. =             printtitle(&abort);
  240. =             pty=0;
  241. =           }
  242. =           printinfo(&u,&abort);
  243. =         } else if (!empty())
  244. =           checka(&abort,&next);
  245. =       }
  246. +       tag_files();  /* FT422 */
  247. =       closedl();
  248. =     }
  249. =   }
  250. =   curdir=ocd;
  251. =   if ((num_listed) && (!abort)) {
  252. =     nl();
  253. =     nl();
  254. =     sprintf(s,"%s: %d",get_string(744), num_listed);
  255. =     pl(s);
  256. =     nl();
  257. =   }
  258. +   in_tag=0;  /* FT422 */
  259. = }
  260.  
  261. Almost there.... Find "void xfer_defaults()" and do the following...
  262.  
  263. =   do {
  264. =     outchr(12);
  265. =     pl(get_string(804));
  266. =     pl(get_string(805));
  267. =     outstr(get_string(806));
  268. =     npr(" (%s).\r\n", thisuser.sysstatus & sysstatus_nscan_file_system?
  269. =                     str_yes:str_no);    /* NOTE */
  270. =     outstr(get_string(807));
  271. =     npr(" (%d %s%s).\r\n", thisuser.num_extended, get_string(808),
  272. =                     thisuser.num_extended==1?"":"s");   /* NOTE */
  273. +    npr("5. %sable file tagging.\r\n",thisuser.sysstatus & sysstatus_no_tag?
  274.                     "En":"Dis");  /* FT422  -   NOTE*/
  275. =     pl(get_string(809));
  276. =     nl();
  277. =     prt(2,get_string(297));
  278. =     helpl=32;
  279. @    ch=onek("Q12345");  /* FT422 */
  280. =     switch(ch) {
  281. =       case 'Q':
  282. =         done=1;
  283.  
  284. add the following inside that switch statement...
  285.  
  286. =          thisuser.num_extended=i;
  287. =      }
  288. =      break;
  289. +    case '5':  /* FT422 */
  290. +      if (thisuser.sysstatus & sysstatus_no_tag)  /* FT422 */
  291. +         thisuser.sysstatus -= sysstatus_no_tag;  /* FT422 */
  292. +       else  /* FT422 */
  293. +        thisuser.sysstatus += sysstatus_no_tag;  /* FT422 */
  294. +      break;  /* FT422 */
  295.  Close "XFER.C"
  296.